<?php
return [
    //Url 配置
    /**
     * url模式:
     * 1 PATH_INFO                          ...xx.com/index.php/post/edit/id/34
     * 2 rewrite(需开启对应 Apache/nginx 模块,对应配置) ...xx.com/post/edit/id/34
     * 3 兼容模式                           ...xx.com/index.php?r=post/edit/id/34
     * 4 传统get方式                        ...xx.com/index.php?c=post&a=edit&id=34
     *
     */
    'mode'             => 1,
    // 'enabledRule' => true,
    'rules' => [
        /**
         * 模块 post 下面的所有请求都会定向到 /index/global
         * @example  http://xxx.com/[post/manage]   -> http://xxx.com/[index/global]
         */
        // '<m:post>/<c:\w{2,12}>'     => '<c:index>/<a:global>',
        /**
         * 模块 post 下面的所有请求都会定向到 /index/@a [indexContrlller下的同名方法]
         * @example  http://xxx.com/post/manage/[add]   -> http://xxx.com/index/[add]
         */
        '<c:site>/<a:add>'     => '<c:@c>/<a:about>',
        '<category:\w+>/<id:\d+>' => '<c:post>/<a:index>/category/<category>/id/<id>',
        // '<category:\w+>/<year>/<month>/<day>' => '<c:post>/<a:archive>/category/<category>/time/<year>-<month>-<day>',
        # /[test-page.html]               -->   /?[c=post&a=index&title=test-page]
        '<title:\w{1,12}(?:-\w{1,12}){0,15}(?:\.html){1}>' => '<m:post>/<c:manage>/<a:index>/title/<title>',
    ]
];